package org.springblade.modules.admin.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.AllArgsConstructor;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.modules.admin.dto.ByScoreQuestionAppealSearchDTO;
import org.springblade.modules.admin.service.ByScoreQuestionAppealService;
import org.springblade.modules.admin.vo.ByScoreQuestionAppealPageVO;
import org.springblade.modules.admin.vo.PlanAbarbeitungByContentVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Date 9:29 2025/5/20
 * @Description {
 *   保养评分问题申诉
 * }
 * @Author lsay
 **/
@AllArgsConstructor
@RestController
@RequestMapping("/by/score/question/appeal")
public class ByScoreQuestionAppealController {

	private final ByScoreQuestionAppealService byScoreQuestionAppealService;

	@GetMapping("/page")
	public R<IPage<ByScoreQuestionAppealPageVO>> page(Query query, ByScoreQuestionAppealSearchDTO searchDTO){
		return R.data(byScoreQuestionAppealService.selectPage(Condition.getPage(query),searchDTO));
	}

	@GetMapping("/detail")
	public R<List<PlanAbarbeitungByContentVO>> detail(Long id){
		return R.data(byScoreQuestionAppealService.selectDetail(id));
	}

}
